package com.dudy.common.base;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @program: common
 * author: dudy
 * create: 2020-11-03 14:30
 * description:
 **/
public class PageData<T> implements Serializable {
    /**
     * 当前页
     */
    private int pageNum = 1;
    /**
     * 每页的数量
     */
    private int pageSize = 10;
    /**
     * 当前页的数量
     */
    private int size;
    /**
     * 总记录数
     */
    protected long total;
    /**
     * 结果集
     */
    protected List<T> list = new ArrayList<>();

    public int getPageNum() {
        return pageNum;
    }

    public PageData<T> setPageNum(int pageNum) {
        this.pageNum = pageNum;
        return this;
    }

    public int getPageSize() {
        return pageSize;
    }

    public PageData<T> setPageSize(int pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    public int getSize() {
        return size;
    }

    public PageData<T> setSize(int size) {
        this.size = size;
        return this;
    }

    public long getTotal() {
        return total;
    }

    public PageData<T> setTotal(long total) {
        this.total = total;
        return this;
    }

    public List<T> getList() {
        return list;
    }

    public PageData<T> setList(List<T> list) {
        this.list = list;
        return this;
    }
}
